1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method, and more specifically to an image processing apparatus, an image processing method, and a program for correcting chromatic aberration caused by optical factors to suppress color blur.
2. Description of the Related Art
Digital video cameras and digital cameras in recent years can obtain high quality images by employing an image sensor with a large number of pixels.
On the other hand, due to miniaturization of pixels and a small-sized lens, color blur, which is an influence of chromatic aberration caused by differences of image forming positions for each wavelength of light, appears easily in an image.
Conventionally, as a technique for suppressing color blur in a captured image, various methods have been proposed.
For example, in Japanese Patent Application Laid-Open No. 2000-076428, a technique is discussed in which a lens used to capture an image is recognized, aberration information is read to generate a correction parameter, and coordinates of a color signal to be corrected is moved according to the correction parameter.
However, color blur characteristics change in a complex manner according to an image height position from the center of the optical axis to a target pixel, a position of a zoom lens, an opening diameter of an iris, and a position of a focus lens. Therefore, in a configuration discussed in Japanese Patent Application Laid-Open No. 2000-076428 in which lens aberration information is read, the aberration information needs to be stored for each of the image height positions, the positions of the zoom lens, the opening diameters of the iris, the positions of the focus lens, and types of lenses. Hence, the capacity of a memory storing these aberration information items needs to be large.
Therefore, a technique is proposed in which, instead of reading the lens aberration information stored in advance, an area where color blur is expected to occur on the image is extracted, and color blur is suppressed in the area. For example, in Japanese Patent Application Laid-Open No. 2003-102027, a technique is discussed in which a difference between two color components in an image is detected, an area where the difference is large is determined to be an area where color blur occurs, and the color blur is suppressed.
However, when, instead of reading the stored lens aberration information, an area is determined where color blur occurs on the image, it is difficult to completely eliminate a wrong determination. For example, in a configuration discussed in Japanese Patent Application Laid-Open No. 2003-102027, in which a difference between two color components is detected, if a subject image has a pattern having features which may be seen as color blur, even when color blur does not occur, the pattern may be determined to be color blur. As a result, even when an area does not have color blur, the color density of the area may be decreased, or the pixels in the area may be replaced by nearby pixels.
This is not limited to the configuration as discussed in Japanese Patent Application Laid-Open No. 2003-102027. If an area where color blur occurs and a degree of the color blur are determined from a brightness component and a color component of the image, there is a problem that the determination result is affected by the subject image.
To avoid such a situation, it is conceivable to set a strict condition to determine an area of color blur. However, if a strict condition to determine an area of color blur is simply set, an area where color blur really occurs but which is not determined to be an area of color blur increases, so that this does not contribute to improving image quality.
In addition, by performing gamma correction processing on an image on which color blur suppression processing has been performed, the gradient may change. As a result, an area in which color blur does not occur but color density is suppressed by wrong determination, or an area in which color blur occurs but the color blur is not suppressed, may become more noticeable.